package br.ufpe.cin.camid.core.events;

import com.google.common.eventbus.EventBus;
import com.google.inject.spi.InjectionListener;

public class EventBusInjectionListener<I> implements InjectionListener<I> 
{
	private EventBus eventBus;
	
	public EventBusInjectionListener(EventBus eventBus)
	{
		this.eventBus = eventBus;
	}
	
	@Override
	public void afterInjection(I injectee) 
	{
		eventBus.register(injectee);
	}
}
